package com.ule.activity.controller;

import com.ule.activity.model.Emp;
import com.ule.activity.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author wuli
 * @create 2021-10-31 13:41
 */
@RestController
public class EmpController {

    @Autowired
    EmpService empService;

    @RequestMapping("/queryEmp")
    public String queryEmp() {
        List<Emp> emps = empService.queryEmp();
        System.out.println(emps);
        return "queryEmp";
    }

    @RequestMapping("/insertEmp")
    public String insertEmp() {
       empService.insertEmp();
        return "insertEmp";
    }
}
